package com.hk.commons.entity.view;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.hk.commons.DataMasking;
import com.hk.commons.StringHelper;

@Entity
@Table(name = "paymentView")
public class PaymentView implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1024909649280356014L;
	@Id
	private Long paymentId;
	private Long createCts;
	private String realName;
	private String phone;
	private String recommendCode;

	public Long getPaymentId() {
		return paymentId;
	}

	public void setPaymentId(Long paymentId) {
		this.paymentId = paymentId;
	}

	public Long getCreateCts() {
		return createCts;
	}

	public void setCreateCts(Long createCts) {
		this.createCts = createCts;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRecommendCode() {
		return recommendCode;
	}

	public void setRecommendCode(String recommendCode) {
		this.recommendCode = recommendCode;
	}

	public String getEncryptPhone() {
		String str = "";
		if (StringHelper.isNotEmpty(phone)) {
			str = DataMasking.getMaskingData(phone, 4, 4);
		}
		return str;
	}
}
